• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.

Archived

This topic is now archived and is closed to further replies.

Julio

CVA Problems

5 posts in this topic

I'm trying to implement compiled vertex arrays in my engine. my first attempt failed, and my second attempt won't even run. I've borrowed initialization code from glVelocity, and when I get it working I plan on rewriting it. anyways, the cva's won't initialize. my hardware Geforce 256) has the correct extension and is capable of cva's. is there anything wrong in the code?
    
GLLOCKARRAYSEXTPROC m_glLockArraysEXT	= 0;
GLUNLOCKARRAYSEXTPROC m_glUnlockArraysEXT	= 0;
GLARRAYELEMENTEXTPROC m_glArrayElementEXT	= 0;
GLCOLORPOINTEREXTPROC m_glColorPointerEXT	= 0;
GLDRAWARRAYSEXTPROC m_glDrawArraysEXT	= 0;
GLEDGEFLAGPOINTEREXTPROC m_glEdgeFlagPointerEXT= 0;
GLGETPOINTERVEXTPROC m_glGetPointervEXT= 0;
GLINDEXPOINTEREXTPROC m_glIndexPointerEXT	= 0;
GLNORMALPOINTEREXTPROC m_glNormalPointerEXT= 0;
GLTEXCOORDPOINTEREXTPROC m_glTexCoordPointerEXT= 0;
GLVERTEXPOINTEREXTPROC m_glVertexPointerEXT= 0;
GLCLIENTACTIVETEXTUREARBPROC m_glClientActiveTextureARB = 0;
  
and the initialization:
      
	m_glArrayElementEXT = (GLARRAYELEMENTEXTPROC) 
		wglGetProcAddress("glArrayElementEXT");
	m_glColorPointerEXT = (GLCOLORPOINTEREXTPROC) 
		wglGetProcAddress("glColorPointerEXT");
	m_glDrawArraysEXT = (GLDRAWARRAYSEXTPROC) 
		wglGetProcAddress("glDrawArraysEXT");
	m_glEdgeFlagPointerEXT = (GLEDGEFLAGPOINTEREXTPROC) 
		wglGetProcAddress("glEdgeFlagPointerEXT");
	m_glGetPointervEXT = (GLGETPOINTERVEXTPROC) 
		wglGetProcAddress("glGetPointervEXT");
	m_glIndexPointerEXT = (GLINDEXPOINTEREXTPROC) 
		wglGetProcAddress("glIndexPointerEXT");
	m_glNormalPointerEXT = (GLNORMALPOINTEREXTPROC) 
		wglGetProcAddress("glNormalPointerEXT");
	m_glTexCoordPointerEXT = (GLTEXCOORDPOINTEREXTPROC) 
		wglGetProcAddress("glTexCoordPointerEXT");
	m_glVertexPointerEXT = (GLVERTEXPOINTEREXTPROC) 
		wglGetProcAddress("glVertexPointerEXT");

	if (m_glArrayElementEXT  == 0 || m_glColorPointerEXT    == 0 || //here is returns false, everything is 0

		m_glDrawArraysEXT    == 0 || m_glEdgeFlagPointerEXT == 0 ||
		m_glGetPointervEXT   == 0 || m_glIndexPointerEXT    == 0 ||
		m_glNormalPointerEXT == 0 || m_glTexCoordPointerEXT == 0 ||
		m_glVertexPointerEXT == 0)
	{
		return false;
	}

	m_glLockArraysEXT = (GLLOCKARRAYSEXTPROC) 
		wglGetProcAddress("glLockArraysEXT");
	m_glUnlockArraysEXT = (GLUNLOCKARRAYSEXTPROC) 
		wglGetProcAddress("glUnlockArraysEXT");

	if (m_glLockArraysEXT == 0 || m_glUnlockArraysEXT == 0)
		return false;

	m_glClientActiveTextureARB = (GLACTIVETEXTUREARBPROC) 
		wglGetProcAddress("glClientActiveTextureARB");

	if (m_glClientActiveTextureARB == 0)
		return false;

	return true;
    
Everything compiles fine. yes, I have glext.h linked to it. if anybody might know what's wrong that'd be great. thanks, Joe Never underestimante the power of stupid people in large groups. Edited by - Julio on July 30, 2001 9:40:09 PM
0

Share this post


Link to post
Share on other sites
Almost all of the functions is already a part of OpenGL 1.1 so no need to get the addresses. You are using prototypes like
GLLOCKARRAYSEXTPROC m_glLockArraysEXT = 0;
but my glext.h would like
PFNGLLOCKARRAYSEXTPROC m_glLockArraysEXT =0;

In the last one are you using (GLACTIVETEXTUREARBPROC) with wglGetProcAddress("glClientActiveTextureARB") but probably meant wglGetProcAddress("glActiveTextureARB").

0

Share this post


Link to post
Share on other sites
well, all of those are defined in glext.h. why don''t I need to get the proc address? could you explain more?
thanks,
Joe


Never underestimante the power of stupid people in large groups.
0

Share this post


Link to post
Share on other sites
nevermind. I think I see what you''re saying. I found a great tutorial on this. I doesn''t look like it has to be that hard. I think I''m just going to rewrite all of the code.


Never underestimante the power of stupid people in large groups.
0

Share this post


Link to post
Share on other sites
ok, I rewrote the code just to get something to show on the screen. this is my code:
      
bool CVertexArray::Init()
{
glLockArraysEXT = (PFNGLLOCKARRAYSEXTPROC) wglGetProcAddress("glLockArraysEXT");
glUnlockArraysEXT = (PFNGLUNLOCKARRAYSEXTPROC) wglGetProcAddress("glUnlockArraysEXT");

if(glLockArraysEXT == NULL || glUnlockArraysEXT == NULL)
{
return false;
}
return true;
}

and the render:
     
void CVertexArray::Render(float *pIndicies, float *pTexCoords, unsigned int iVertexCount)
{
glEnableClientState(GL_VERTEX_ARRAY);

glEnableClientState(GL_TEXTURE_COORD_ARRAY);

glVertexPointer(3, GL_FLOAT, 0, pIndicies);

glTexCoordPointer(2, GL_FLOAT, 0, pTexCoords);

glLockArraysEXT(0, iVertexCount);

// Render

glDrawArrays(GL_TRIANGLES, 0, 3);

glDisableClientState(GL_TEXTURE_COORD_ARRAY);

glUnlockArraysEXT();
}

I plan on getting rid of redundand state changes later, but for now I just want it to work. The problem is that in the initialization both glLockArraysEXT and glUnlockArraysEXT are 0, NULL. WHY? It works fine in other programs I run. At the top of my class .cpp file I declare them:
  
typedef void (APIENTRY *PFNGLLOCKARRAYSEXTPROC) (int first, int count);
typedef void (APIENTRY *PFNGLUNLOCKARRAYSEXTPROC) (void);

PFNGLLOCKARRAYSEXTPROC glLockArraysEXT = NULL;
PFNGLUNLOCKARRAYSEXTPROC glUnlockArraysEXT = NULL;

thanks,
Joe


Never underestimante the power of stupid people in large groups.

Edited by - Julio on August 1, 2001 1:40:47 PM

Edited by - Julio on August 1, 2001 1:42:02 PM
0

Share this post


Link to post
Share on other sites
You should have a current OpenGL rendering context before calling wglGetProcAddress. Here is all about OpenGL extensions
http://www.opengl.org/developers/code/features/OGLextensions/OGLextensions.html
0

Share this post


Link to post
Share on other sites