Jump to content
  • Advertisement

ADumbledore

Member
  • Content Count

    13
  • Joined

  • Last visited

Community Reputation

122 Neutral

About ADumbledore

  • Rank
    Member
  1. ADumbledore

    Texture not rendering

    Just like to say that I got it working, although I don't know how. Must have just been some weird error I made.
  2. Hello, I had my texture rendering fine on my 3d model using openGL on win32. After I put the rendering code in a DLL and made it a child window of a client, it discontinued rendering the model's texture. (Everthing else is working though... the model renders with animations playing etc...) Me being a newb, I don't know where I should I be looking. As I said, nothing in the rendering code has changed, nor the texture location, etc... It's all the same, I just changed the window class, the size of the window, and I'm creating it as a child of a parent window. Thanks in advance... just looking for a push in the right direction on this one.
  3. ADumbledore

    GL_LIGHTING

    Hello, I don't understand why the following code: GL::Render() { GLfloat lightDir[] = {0, 1.0, 1.0, 0}; GLfloat blue[] = {0.0, 0.0, 1.0, 1.0}; // clear screen and depth buffer glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // load the identity matrix (clear to default position and orientation) glLoadIdentity(); glLightfv(GL_LIGHT0, GL_DIFFUSE, blue); // cut out some code here that causes the object drawn to rotate DrawObject(); } would result in the object being lit with a blue color as it rotates for about 45 degrees, and then the entire object dims (no lighting) for the next say 215 degrees. I would have thought that the light source is constant, so as the object rotates the portion facing the light would be lit blue. Thanks for any help!
  4. ADumbledore

    Understanding the Modelview Matrix

    Thanks all for the links. And special thanks for this: Quote: Where R is the right vector, U is the up vector, A is the lookAt vector, these 3 vectors are orthonormal to each other and they form the view orientation. T is the translation. Now to make objects actually transform into this space, you have to inverse the 3x3 sub matrix (the R U A part), and transform the inverse translation by that ( -T*(R U A 3x3 inverse) ) Now I have to admit I don't understand it completely yet, but this was what I was asking for. Thank you!
  5. ADumbledore

    Understanding the Modelview Matrix

    Thanks all for the links. And special thanks for this: Quote: Where R is the right vector, U is the up vector, A is the lookAt vector, these 3 vectors are orthonormal to each other and they form the view orientation. T is the translation. Now to make objects actually transform into this space, you have to inverse the 3x3 sub matrix (the R U A part), and transform the inverse translation by that ( -T*(R U A 3x3 inverse) ) Now I have to admit I don't understand it completely yet, but this was what I was asking for. Thank you!
  6. ADumbledore

    Understanding the Modelview Matrix

    Hi thanks for the link. I read through it but I'm still not understanding what is happening under the hood of the glTranslate function. My understanding so far is: glLoadMatrix(GL_MODELVIEW); // model coordinates relative to camera matrix glLoadIdentity(); // GL_MODELVIEW matrix equals 4x4 identity matrix. // If the GL_MODELVIEW is the identity matrix then openGL defaults the camera to // the origin looking down the negative z axis. glTranslate3f(0, 0, -5.0); // multiplies the GL_MODELVIEW matrix by // something (not sure what) to make the GL_MODELVIEW matrix equal to: ================== =MODELVIEW MATRIX= ================== 1 | 0 | 0 | 0 0 | 1 | 0 | 0 0 | 0 | 1 | -5 0 | 0 | 0 | 1 ================== ================== // At this point I am lost because I don't know what is done with the MODELVIEW // MATRIX to make the square render at position (0, 0, -5) in world // coordinates, or if it even does render at that position. DrawSquare(); // draw the square at position (0, 0, -5) by translating its // local coordinate system's origin by -5 units in along the z axis. On a side note, I don't understand how a 4x4 matrix is used to translate things. Isn't the final image rendered to the viewport a big matrix equal to the resolution of the monitor in fullscreen mode? Say 1280x1024. If so, how is this 4x4 MODELVIEW matrix made compatible with a 1280x1024 matrix so that it can perform transformations on objects displayed within the 1280x1024? Sorry I'm so dumb, but I could really use an explanation, thanks!
  7. Hello. I am learning opengl and I have a question about the Modelview Matrix. I can't understand how it applies to rendering the scene and performing translations, rotations, and scaling. I found this http://www.opengl.org/documentation/specs/version1.1/glspec1.1/node25.html Which shows, for instance, what the 4x4 modelview matrix looks like after applying a translate. That is fine, but I have no context to understand why changing the modelview matrix values makes changes to the final matrix of pixes that gets rendered to the viewport. Even just a link that explains how the modelview matrix is used to manipulate what finally gets rendered to the viewport would greatly reduce my learning curve. Thanks! [Edited by - ADumbledore on August 30, 2008 9:22:36 AM]
  8. ADumbledore

    GL_POINT_SIZE_MIN undeclared identifier

    Nice Bitshift! I simultaneously found this out by reading this: http://www.gamedev.net/reference/programming/features/oglext/ My only thought is... "what the hell?" For any kind of library support, the absolute worse case that I can think of is making the programmer load function addresses from dlls in order to link to them. I will try out your easy way Bitshift, and hopefully it isn't too painful. I must admit though, after finding this out, my first day of delving into OpenGL might be my last...
  9. ADumbledore

    GL_POINT_SIZE_MIN undeclared identifier

    Thanks, but did you guys not hear me say "How do i update my opengl version?" I already figured it was my version... for the life of me i just can't figure out how to update it! EDIT: Alright I am kind of at a loss because it says my version is 2.1.2. Searching this problem led me to posts on gamedev forums where guys had posted the exact same issue and none were resolved. I guess there's no reason to expect mine will be any different. [Edited by - ADumbledore on August 24, 2008 3:26:41 PM]
  10. ADumbledore

    GL_POINT_SIZE_MIN undeclared identifier

    Hey Bitshifter, I know what you are talking about as I also tested the range, however the glparameter, as i understand it, is for setting implementation specific ranges. So for example simulating distance attenuation, you decrease the size of the pixel as your eye moves farther away, and that is what glPointParameter(GL_POINT_SIZE_MIN, param) is used to specify constraints for. Unfortunately I don't know why my installed opengl library doesn't declare it. Additionally these other ones are not declared: glPointParameterf(GL_POINT_SIZE_MIN, 100.0); glPointParameterf(GL_POINT_DISTANCE_ATTENUATION, abc); glPointParameterf(GL_POINT_FADE_THRESHOLD, 500.0); I suspect it is my opengl version, but I don't know how to update it. Does it come as part of my graphics card drivers?
  11. Disclaimer: Though it might seem like I know what I am talking about, this is my first day getting into OpenGL, so please don't assume I know what you are talking about if you use advanced terminology. Problem: The following information is ordered in order of importance, but before I get into any details the central issue is: GL_POINT_SIZE_MIN is not declared in "gl.h" where I imagine it should be declared. Code: glPointParameterf(GL_POINT_SIZE_MIN, 1.0f); and I get the next errors: 'GL_POINT_SIZE_MIN' : undeclared identifier 'glPointParameterf': identifier not found I also checked in "gl/gl.h" and GL_POINT_SIZE_MIN isn't declared there, but it looks like it should be. I noticed also that gl.h has this line /* Version */ #define GL_VERSION_1_1 1 So is it possible that my header is out of date and that is my problem? If this is true, then please illustrate how I'd go about updating. I have googled "opengl update" and variants with no luck. I didn't really know how to confirm my version so I downloaded this thing called OpenGL Extensions Viewer which says my version is 2.1. The full report is listed below: System Info Windows XP Professional Vendor NVIDIA Corporation 2.1.2 Renderer GeForce 6600 GT/PCI/SSE2/3DNOW! Extensions GL_ARB_color_buffer_float GL_ARB_depth_texture GL_ARB_draw_buffers GL_ARB_fragment_program GL_ARB_fragment_program_shadow GL_ARB_fragment_shader GL_ARB_half_float_pixel GL_ARB_imaging GL_ARB_multisample GL_ARB_multitexture GL_ARB_occlusion_query GL_ARB_pixel_buffer_object GL_ARB_point_parameters GL_ARB_point_sprite GL_ARB_shader_objects GL_ARB_shading_language_100 GL_ARB_shadow GL_ARB_texture_border_clamp GL_ARB_texture_compression GL_ARB_texture_cube_map GL_ARB_texture_env_add GL_ARB_texture_env_combine GL_ARB_texture_env_dot3 GL_ARB_texture_float GL_ARB_texture_mirrored_repeat GL_ARB_texture_non_power_of_two GL_ARB_texture_rectangle GL_ARB_transpose_matrix GL_ARB_vertex_buffer_object GL_ARB_vertex_program GL_ARB_vertex_shader GL_ARB_window_pos GL_ATI_draw_buffers GL_ATI_texture_float GL_ATI_texture_mirror_once GL_EXT_abgr GL_EXT_bgra GL_EXT_blend_color GL_EXT_blend_equation_separate GL_EXT_blend_func_separate GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_Cg_shader GL_EXT_compiled_vertex_array GL_EXT_depth_bounds_test GL_EXT_draw_range_elements GL_EXT_fog_coord GL_EXT_framebuffer_blit GL_EXT_framebuffer_multisample GL_EXT_framebuffer_object GL_EXT_gpu_program_parameters GL_EXT_multi_draw_arrays GL_EXT_packed_depth_stencil GL_EXT_packed_pixels GL_EXT_pixel_buffer_object GL_EXT_point_parameters GL_EXT_rescale_normal GL_EXT_secondary_color GL_EXT_separate_specular_color GL_EXT_shadow_funcs GL_EXT_stencil_two_side GL_EXT_stencil_wrap GL_EXT_texture3D GL_EXT_texture_compression_s3tc GL_EXT_texture_cube_map GL_EXT_texture_edge_clamp GL_EXT_texture_env_add GL_EXT_texture_env_combine GL_EXT_texture_env_dot3 GL_EXT_texture_filter_anisotropic GL_EXT_texture_lod GL_EXT_texture_lod_bias GL_EXT_texture_mirror_clamp GL_EXT_texture_object GL_EXT_texture_sRGB GL_EXT_timer_query GL_EXT_vertex_array GL_IBM_rasterpos_clip GL_IBM_texture_mirrored_repeat GL_KTX_buffer_region GL_NV_blend_square GL_NV_copy_depth_to_color GL_NV_depth_clamp GL_NV_fence GL_NV_float_buffer GL_NV_fog_distance GL_NV_fragment_program GL_NV_fragment_program2 GL_NV_fragment_program_option GL_NV_framebuffer_multisample_coverage GL_NV_half_float GL_NV_light_max_exponent GL_NV_multisample_filter_hint GL_NV_occlusion_query GL_NV_packed_depth_stencil GL_NV_pixel_data_range GL_NV_point_sprite GL_NV_primitive_restart GL_NV_register_combiners GL_NV_register_combiners2 GL_NV_texgen_reflection GL_NV_texture_compression_vtc GL_NV_texture_env_combine4 GL_NV_texture_expand_normal GL_NV_texture_rectangle GL_NV_texture_shader GL_NV_texture_shader2 GL_NV_texture_shader3 GL_NV_vertex_array_range GL_NV_vertex_array_range2 GL_NV_vertex_program GL_NV_vertex_program1_1 GL_NV_vertex_program2 GL_NV_vertex_program2_option GL_NV_vertex_program3 GL_NVX_conditional_render GL_S3_s3tc GL_SGIS_generate_mipmap GL_SGIS_texture_lod GL_SGIX_depth_texture GL_SGIX_shadow GL_SUN_slice_accum GL_WIN_swap_hint WGL_ARB_buffer_region WGL_ARB_extensions_string WGL_ARB_make_current_read WGL_ARB_multisample WGL_ARB_pbuffer WGL_ARB_pixel_format WGL_ARB_pixel_format_float WGL_ARB_render_texture WGL_ATI_pixel_format_float WGL_EXT_extensions_string WGL_EXT_swap_control WGL_NV_float_buffer WGL_NV_render_depth_texture WGL_NV_render_texture_rectangle Core features v1.1 (100 % - 7/7) v1.2 (100 % - 8/8) v1.3 (100 % - 9/9) v1.4 (100 % - 15/15) v1.5 (100 % - 3/3) v2.0 (100 % - 10/10) v2.1 (100 % - 3/3) OpenGL driver version check (Current: 6.14.11.6921, Latest known: 6.14.11.6218): Latest version of display drivers found According the database, you are running the latest display drivers for your video card. Compiled vertex array support This feature improves OpenGL performance by using video memory to cache transformed vertices. Multitexture support This feature accelerates complex rendering such as lightmaps or environment mapping. Secondary color support This feature provides an alternate method of coloring specular highlights on polygons. S3TC compression support This feature improves texture mapping performance in some applications by using lossy compression. Vertex array range support This feature improves performance in some applications by using AGP for dynamic vertex transformation. Texture edge clamp support This feature improves texturing quality by adding clamping control to edge texel filtering. Vertex program support This feature enables a wide variety of effects via flexible vertex programming (equivalent to DX8 Vertex Shader.) Fragment program support This feature enables a wide variety of effects via per pixel programming (equivalent to DX9 Pixel Shader.) Texture anisotropic filtering support This feature improves the quality of texture mapping on oblique surfaces. Occlusion test support This feature provides hardware accelerated culling for objects. Point sprite support This feature improves performance in some particle systems. OpenGL Shading Language support This feature enables high level shading language for shaders. Frame buffer object support This feature enables render to texture functionality. Extension verification: GL_EXT_copy_texture was not found, but has the entry point glCopyTexSubImage3DEXT GL_EXT_subtexture was not found, but has the entry point glTexSubImage3DEXT GL_KTX_buffer_region has the entry point glBufferRegionEnabledEXT missing! GL_KTX_buffer_region has the entry point glDeleteBufferRegionEXT missing! GL_KTX_buffer_region has the entry point glDrawBufferRegionEXT missing! GL_KTX_buffer_region has the entry point glNewBufferRegionEXT missing! GL_KTX_buffer_region has the entry point glReadBufferRegionEXT missing! GL_NV_half_float has the entry point glVertexWeighthNV missing! GL_NV_half_float has the entry point glVertexWeighthvNV missing! WGL_NV_vertex_array_range was not found, but has the entry point wglAllocateMemoryNV WGL_NV_vertex_array_range was not found, but has the entry point wglFreeMemoryNV GL_EXTX_packed_depth_stencil was not found, but is available in driver version 6.14.10.8126 GL_HP_occlusion_test was not found, but is available in driver version 2.0.3 GL_NV_centroid_sample was not found, but is available in driver version 6, 14, 10, 113 GL_NV_framebuffer_multisample_ex was not found, but is available in driver version 6.14.10.9689 GL_NV_timer_query was not found, but is available in driver version 6.14.10.8040 Thank you
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!