/*
Fork by Martin Lucas Golini
Original author
Jonathan Dummer
2007-07-26-10.36
Simple OpenGL Image Library 2
Public Domain
using Sean Barret's stb_image as a base
Thanks to:
* Sean Barret - for the awesome stb_image
* Dan Venkitachalam - for finding some non-compliant DDS files, and patching some explicit casts
* everybody at gamedev.net
*/
#define SOIL_CHECK_FOR_GL_ERRORS 0
#if defined( __APPLE_CC__ ) || defined ( __APPLE__ )
#include <TargetConditionals.h>
#if defined( __IPHONE__ ) || ( defined( TARGET_OS_IPHONE ) && TARGET_OS_IPHONE ) || ( defined( TARGET_IPHONE_SIMULATOR ) && TARGET_IPHONE_SIMULATOR )
#define SOIL_PLATFORM_IOS
#include <dlfcn.h>
#else
#define SOIL_PLATFORM_OSX
#endif
#elif defined( __ANDROID__ ) || defined( ANDROID )
#define SOIL_PLATFORM_ANDROID
#elif ( defined ( linux ) || defined( __linux__ ) || defined( __FreeBSD__ ) || defined(__OpenBSD__) || defined( __NetBSD__ ) || defined( __DragonFly__ ) || defined( __SVR4 ) )
#define SOIL_X11_PLATFORM
#endif
#if ( defined( SOIL_PLATFORM_IOS ) || defined( SOIL_PLATFORM_ANDROID ) ) && ( !defined( SOIL_GLES1 ) && !defined( SOIL_GLES2 ) )
#define SOIL_GLES2
#endif
#if ( defined( SOIL_GLES2 ) || defined( SOIL_GLES1 ) ) && !defined( SOIL_NO_EGL ) && !defined( SOIL_PLATFORM_IOS )
#include <EGL/egl.h>
#endif
#if defined( SOIL_GLES2 )
#ifdef SOIL_PLATFORM_IOS
#include <OpenGLES/ES2/gl.h>
#include <OpenGLES/ES2/glext.h>
#else
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
#endif
#define APIENTRY GL_APIENTRY
#elif defined( SOIL_GLES1 )
#ifndef GL_GLEXT_PROTOTYPES
#define GL_GLEXT_PROTOTYPES
#endif
#ifdef SOIL_PLATFORM_IOS
#include <OpenGLES/ES1/gl.h>
#include <OpenGLES/ES1/glext.h>
#else
#include <GLES/gl.h>
#include <GLES/glext.h>
#endif
#define APIENTRY GL_APIENTRY
#else
#if defined( __WIN32__ ) || defined( _WIN32 ) || defined( WIN32 )
#define SOIL_PLATFORM_WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <wingdi.h>
#include <GL/gl.h>
#elif defined(__APPLE__) || defined(__APPLE_CC__)
/* I can't test this Apple stuff! */
#include <OpenGL/gl.h>
#include <Carbon/Carbon.h>
#define APIENTRY
#elif defined( SOIL_X11_PLATFORM )
#include <GL/gl.h>
#include <GL/glx.h>
#else
#include <GL/gl.h>
#endif
#endif
#ifndef GL_BGRA
#define GL_BGRA 0x80E1
#endif
#ifndef GL_RG
#define GL_RG 0x8227
#endif
#ifndef GL_UNSIGNED_SHORT_4_4_4_4
#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
#endif
#ifndef GL_UNSIGNED_SHORT_5_5_5_1
#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
#endif
#ifndef GL_UNSIGNED_SHORT_5_6_5
#define GL_UNSIGNED_SHORT_5_6_5 0x8363
#endif
#ifndef GL_UNSIGNED_BYTE_3_3_2
#define GL_UNSIGNED_BYTE_3_3_2 0x8032
#endif
#include "SOIL2.h"
#define STB_IMAGE_IMPLEMENTATION
#include "stb_image.h"
#define STB_IMAGE_WRITE_IMPLEMENTATION
#include "stb_image_write.h"
#include "image_helper.h"
#include "image_DXT.h"
#include "pvr_helper.h"
#include "pkm_helper.h"
#include "jo_jpeg.h"
#include <stdlib.h>
#include <string.h>
/* error reporting */
const char *result_string_pointer = "SOIL initialized";
/* for loading cube maps */
enum{
SOIL_CAPABILITY_UNKNOWN = -1,
SOIL_CAPABILITY_NONE = 0,
SOIL_CAPABILITY_PRESENT = 1
};
static int has_cubemap_capability = SOIL_CAPABILITY_UNKNOWN;
int query_cubemap_capability( void );
#define SOIL_TEXTURE_WRAP_R 0x8072
#define SOIL_CLAMP_TO_EDGE 0x812F
#define SOIL_NORMAL_MAP 0x8511
#define SOIL_REFLECTION_MAP 0x8512
#define SOIL_TEXTURE_CUBE_MAP 0x8513
#define SOIL_TEXTURE_BINDING_CUBE_MAP 0x8514
#define SOIL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
#define SOIL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
#define SOIL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
#define SOIL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
#define SOIL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
#define SOIL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
#define SOIL_PROXY_TEXTURE_CUBE_MAP 0x851B
#define SOIL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
/* for non-power-of-two texture */
#define SOIL_IS_POW2( v ) ( ( v & ( v - 1 ) ) == 0 )
static int has_NPOT_capability = SOIL_CAPABILITY_UNKNOWN;
int query_NPOT_capability( void );
/* for texture rectangles */
static int has_tex_rectangle_capability = SOIL_CAPABILITY_UNKNOWN;
int query_tex_rectangle_capability( void );
#define SOIL_TEXTURE_RECTANGLE_ARB 0x84F5
#define SOIL_MAX_RECTANGLE_TEXTURE_SIZE_ARB 0x84F8
/* for using DXT compression */
static int has_DXT_capability = SOIL_CAPABILITY_UNKNOWN;
int query_DXT_capability( void );
static int has_3Dc_capability = SOIL_CAPABILITY_UNKNOWN;
int query_3Dc_capability( void );
#define SOIL_GL_SRGB 0x8C40
#define SOIL_GL_SRGB_ALPHA 0x8C42
#define SOIL_RGB_S3TC_DXT1 0x83F0
#define SOIL_RGBA_S3TC_DXT1 0x83F1
#define SOIL_RGBA_S3TC_DXT3 0x83F2
#define SOIL_RGBA_S3TC_DXT5 0x83F3
#define SOIL_COMPRESSED_RG_RGTC2 0x8DBD
#define SOIL_GL_COMPRESSED_SRGB_S3TC_DXT1_EXT 0x8C4C
#define SOIL_GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT 0x8C4F
static int has_sRGB_capability = SOIL_CAPABILITY_UNKNOWN;
int query_sRGB_capability( void );
typedef void (APIENTRY * P_SOIL_GLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid * data);
static P_SOIL_GLCOMPRESSEDTEXIMAGE2DPROC soilGlCompressedTexImage2D = NULL;
typedef void (APIENTRY *P_SOIL_GLGENERATEMIPMAPPROC)(GLenum target);
static P_SOIL_GLGENERATEMIPMAPPROC soilGlGenerateMipmap = NULL;
static int has_gen_mipmap_capability = SOIL_CAPABILITY_UNKNOWN;
static int query_gen_mipmap_capability( void );
static int has_PVR_capability = SOIL_CAPABILITY_UNKNOWN;
int query_PVR_capability( void );
static int has_BGRA8888_capability = SOIL_CAPABILITY_UNKNOWN;
int query_BGRA8888_capability( void );
static int has_ETC1_capability = SOIL_CAPABILITY_UNKNOWN;
int query_ETC1_capability( void );
/* GL_IMG_texture_compression_pvrtc */
#define SOIL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG 0x8C00
#define SOIL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG 0x8C01
#define SOIL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG 0x8C02
#define SOIL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03
#define SOIL_GL_ETC1_RGB8_OES 0x8D64
#if defined( SOIL_X11_PLATFORM ) || defined( SOIL_PLATFORM_WIN32 ) || defined( SOIL_PLATFORM_OSX ) || defined(__HAIKU__)
typedef const GLubyte *(APIENTRY * P_SOIL_glGetStringiFunc) (GLenum, GLuint);
static P_SOIL_glGetStringiFunc soilGlGetStringiFunc = NULL;
static int isAtLeastGL3()
{
static int is_gl3 = SOIL_CAPABILITY_UNKNOWN;
if ( SOIL_CAPABILITY_UNKNOWN == is_gl3 )
{
const char * verstr = (const char *) glGetString( GL_VERSION );
is_gl3 = ( verstr && ( atoi(verstr) >= 3 ) &&
strstr( verstr, " ES " ) == NULL );
}
return is_gl3;
}
#else
static int isAtLeastGL3()
{
return SOIL_CAPABILITY_NONE;
}
#endif
#ifdef SOIL_PLATFORM_WIN32
static HMODULE openglModule = NULL;
static int soilTestWinProcPointer(const PROC pTest)
{
ptrdiff_t iTest;
if(!pTest) return 0;
iTest = (ptrdiff_t)pTest;
if(iTest == 1 || iTest == 2 || iTest == 3 || iTest == -1) return 0;
return 1;
}
#endif
#if defined(__sgi) || defined (__sun) || defined(__HAIKU__)
#include <dlfcn.h>
void* dlGetProcAddress (const char* name)
{
static void* h = NULL;
static void* gpa;
if (h == NULL)
{
if ((h = dlopen(NULL, RTLD_LAZY | RTLD_LOCAL)) == NULL) return NULL;
gpa = dlsym(h, "glXGetProcAddress");
}
if (gpa != NULL)
return ((void*(*)(const GLubyte*))gpa)((const GLubyte*)name);
else
return dlsym(h, (const char*)name);
}
#endif
void * SOIL_GL_GetProcAddress(const char *proc)
{
void *func = NULL;
#if defined( SOIL_PLATFORM_IOS )
func = dlsym( RTLD_DEFAULT, proc );
#elif defined( SOIL_GLES2
没有合适的资源?快使用搜索试试~ 我知道了~
opengl贝塞尔曲面细分,win7+VS017,win10+vs2019版本
共865个文件
hpp:302个
inl:232个
h:212个
需积分: 5 1 下载量 71 浏览量
2022-04-25
14:20:22
上传
评论
收藏 115.05MB ZIP 举报
温馨提示
opengl贝塞尔曲面细分,win7+VS017,win10+vs2019版本 现在让我们扩展我们的程序,使它将我们简单的矩形网格转换为贝塞尔曲面。细分网格 应该为我们提供了足够的顶点来对曲面进行采样(如果我们想要更多的话,我们可以增加 内部/外部细分级别)。我们现在需要的是通过管线发送控制点,然后使用这些控制点执行计 算以将细分网格转换为我们所需的贝塞尔曲面。
资源详情
资源评论
资源推荐
收起资源包目录
opengl贝塞尔曲面细分,win7+VS017,win10+vs2019版本 (865个子文件)
SOIL2.c 92KB
SOIL2.c 92KB
image_DXT.c 17KB
image_DXT.c 17KB
image_helper.c 10KB
image_helper.c 10KB
wfETC.c 8KB
wfETC.c 8KB
applicationhost.config 75KB
glm.cpp 10KB
glm.cpp 10KB
Utils.cpp 8KB
Utils.cpp 8KB
dummy.cpp 7KB
dummy.cpp 7KB
main.cpp 7KB
main.cpp 7KB
Browse.VC.db 22.95MB
Browse.VC.db 22.58MB
Browse.VC.db 21MB
opengl32.dll 1.21MB
opengl32.dll 1.21MB
freetype.dll 653KB
freetype.dll 653KB
freetype.dll 653KB
glew32.dll 334KB
glew32.dll 334KB
glew32.dll 334KB
soil2.dll 297KB
soil2.dll 297KB
soil2.dll 297KB
glfw3.dll 202KB
glfw3.dll 202KB
glfw3.dll 202KB
.editorconfig 175B
.editorconfig 175B
Prog12_2_tessellationBezier_win7.exe 589KB
Prog12_2_tessellationBezier.vcxproj.filters 2KB
Prog12_2_tessellationBezier_win7.vcxproj.filters 2KB
fragShader.frag 199B
fragShader.frag 199B
glew.h 1.15MB
glew.h 1.15MB
stb_image.h 262KB
stb_image.h 262KB
glfw3.h 209KB
glfw3.h 209KB
glad.h 207KB
glad.h 207KB
freetype.h 162KB
freetype.h 162KB
eglew.h 104KB
eglew.h 104KB
glxew.h 73KB
glxew.h 73KB
GL.H 68KB
GL.H 68KB
wglew.h 63KB
wglew.h 63KB
ttnameid.h 57KB
ttnameid.h 57KB
material.h 51KB
material.h 51KB
ftdriver.h 46KB
ftdriver.h 46KB
stb_image_write.h 40KB
stb_image_write.h 40KB
ftimage.h 38KB
ftimage.h 38KB
ftoption.h 38KB
ftoption.h 38KB
config.h 37KB
config.h 37KB
ftcache.h 33KB
ftcache.h 33KB
pstdint.h 30KB
pstdint.h 30KB
postprocess.h 30KB
postprocess.h 30KB
mesh.h 25KB
mesh.h 25KB
tttables.h 25KB
tttables.h 25KB
cimport.h 24KB
cimport.h 24KB
stbi_pvr_c.h 23KB
stbi_pvr_c.h 23KB
ftheader.h 23KB
ftheader.h 23KB
t1tables.h 22KB
t1tables.h 22KB
ftstroke.h 21KB
ftstroke.h 21KB
ftmodapi.h 21KB
ftmodapi.h 21KB
ftmm.h 21KB
ftmm.h 21KB
ftconfig.h 18KB
ftconfig.h 18KB
ftglyph.h 18KB
共 865 条
- 1
- 2
- 3
- 4
- 5
- 6
- 9
妙为
- 粉丝: 574
- 资源: 206
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- Q1.py
- 企业政府灵智电子政务网站系统-lingzhi.rar
- Thinkphp内核开发Lsky Pro兰空图床网站源码.rar
- 基于FPGA(XC6SLX9)+SDRAM+AD7829多通道数据采集板硬件(原理图+PCB)工程文件.zip
- 阿里巴巴精准测试体系:基于代码链路分析的性能优化方案
- mmexport1714217773503.jpg
- 【图片网盘外链系统5.0】全新前端UI界面设计 支持图片违规检测网站自适应H5源码.rar
- jsp+sql的BBS论坛系统.zip
- 网盘外链PHP开发彩虹网盘外链程序源码.rar
- 2023年最新文件快递柜系统网站源码 保护用户隐私的匿名口令分享和临时文件分享功能.rar
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0