Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

122 Neutral

About novus22

  • Rank

Personal Information

  • Interests

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Thank you both. That's a good fix but I guess i'll stick with the general accepted standard of not having all uppercase for enum values and go through with the effort of renaming all of them. Just so I won't be having this problem in the future as well.
  2. I have the following snippet of code in my logger header file: namespace X { enum class LogPriority { DEBUG = 1, INFO = 2, CONFIG = 3, WARNING = 4, ERROR = 5 }; .... However, I also am including <Windows.h>. It defines the macro ERROR as "0", and therefore the ERROR priority evaluates to 0 = 5. I've searched it up and apparently I can use undef to undefine the macros from the windows header, but I'm not too familiar with the preprocessor so I'm not too sure if undefining ERROR will cause future problems. Is that a safe thing to do? or are there better ways of going on about this? I can indeed change the casing of the enum values, but I'd then be tempted to change all the other enum values in my project to have it standardized throughout, so currently that's a last resort for me. Thanks in advance
  3. Ah, nevermind, I used the extension and implemented anisotropic filtering. It all looks better now. Thanks!
  4. Hey Jihodg I have set the minifcation and magnification filters set to GL_LINEAR_MIPMAP_LINEAR and GL_LINEAR respectfully. For the mipmaps i'm using glGenerateMipmaps(). How would one set up anisotropic filtering? I'm using OpenGL 3.3
  5. I'm very new to OpenGL and graphics programming, and there is probably a simple answer to this. I've made a function that defines a grid and used it to make the "ground" of my game. I added the textures, which have a diffuse, specular, and normal map. When viewed closely the textures look fine However, from the side they look very pixelated I would appreciate if someone points me in the right direction as to how to handle this problem, as since i'm a beginner i'm not quite sure what's causing it. I'm not sure if they'd help but the texture params i'm using are: GL_LINEAR_MIPMAP_LINEAR for min filter, GL_LINEAR for mag filter, and i'm using openGL to generate the mipmaps (glGenerateMipmap). Thanks again
  6. novus22

    Face normals for pyramid

    Finally I understand, thanks!! This made everything much clearer, really appreciate the help!  :)
  7. novus22

    Face normals for pyramid

        Sorry, I'm a bit confused haha. If I were to duplicate my vertices and have each Face struct have 3 distinct vertices, and then calculated vertex normals for all the vertices, wouldn't that have the same effect as simply calculating the face normals? So for smooth shading, you would need vertices that are shared, and if you wish for hard edges for a shape like a pyramid or a cube, you would duplicate the vertices so they're distinct and they don't take the average? Is that why when you want sharp edges, you can just use face normals rather than calculating per vertex normals?
  8. novus22

    Face normals for pyramid

    Thanks Nanoha, I followed your advice and made the face normal (I ended up making a Face struct that holds an array of 3 Vertex objects. Then, I made a std::vector of Face structs in my MeshData, and looped through the number of Faces and calculated the normal there).     This may be a dumb question, but how would you determine which faces share which vertices? Is there a way other than looking at the actual vertex data?  ----     Then I can't wait to get out to the real world ;P I'm currently reading an introductory book to DirectX, and so far we're hard-coding all the vertices and indicies of the shapes we're making within the program. The book will eventually be teaching me how to load files from modeling programs, though. Doing this was mostly for the sake of learning how to calculate light, which required the normals. I understand what you're saying though, my wording was a bit off. I meant to say that the pyramid i'm trying to make doesn't need per vertex normals, not pyramids in general.      
  9. Recently, I learned about face normals, and i'm a bit confused. I need to use them for a directional light, but I've been having trouble calculating them. I would appreciate if someone types the code out for calculating them and explains it.   This is my code for generating a pyramid:   GeneratePyramid(float baseWidth, float baseDepth, float apexHeight, MeshData& meshData) { float halfWidth = baseWidth * 0.5f; float halfDepth = baseDepth * 0.5f; Vertex v[5]; /* v[2] /\\ / \\ v[4] / \\ v[3] v[0] /______\/ v[1] */ v[0] = Vertex(-halfWidth, 0, -halfDepth); v[1] = Vertex(halfWidth, 0, -halfDepth); v[2] = Vertex(0, apexHeight, 0); // apex v[3] = Vertex(halfWidth, 0, halfDepth); v[4] = Vertex(-halfWidth, 0, halfDepth); meshData.vertices.assign(&v[0], &v[5]); unsigned int i[18] = { 0, 2, 1, 1, 2, 3, 3, 2, 4, 4, 2, 0, 0, 1, 4, 1, 3, 4 }; meshData.indices.assign(&i[0], &i[18]); }  the struct MeshData is simply defined as:  struct MeshData { std::vector<Vertex> vertices; std::vector<unsigned int> indices; };  and the Vertex struct is defined as:  struct Vertex { Vertex() {}; Vertex(float x, float y, float z); XMFLOAT3 pos; };  I would like GeneratePyramid() to also calculate the normals. Should I add an "XMFLOAT3 normal" member to the Vertex struct? And if so, how would I use that to calculate them in GeneratePyramid()?   Thanks in advance!    Extra: I read that you don't need vertex normals for pyramids since it has sharp edges, but I would also like to know how you would calculate them.    
  10. novus22

    good Game Development resources

      I would not say that "a big chunk is deprecated". He does base the code on an older version of the DirectX SDK, but the only really deprecated parts are the D3DX libraries, that aren't part of the newer SDKs. The only really big one is the Effects library and you can compile that yourself and use with the new SDKs if you still want to use that:   https://github.com/Microsoft/FX11   And if you don't want to use that, Frank wrote an article on how to use shaders without the library: http://www.d3dcoder.net/Data/Resources/d3d11Metro.pdf   But like I said, the book teaches you a whole lot of 3D math and concepts that will be the same regardless of API, platform or SDK. Regarding the DX12 book, it is true it will soon be out, but like has been said many times on this forum, DX12 is not a replacement for DX11 in the same way that DX11 replaced DX10. DX12 is a lower level library and one that you definitely won't want to start with. DX11 and DX12 are going to coexist for quite some time.   If I were you I would get the DX11 book now and start learning, and if you still want to learn DX12 taking into account that it makes you take care of a bunch of things the driver does for you in DX11, then get that book when it is out.   Great! Thanks for clearing that up. I'll be getting the book then. Thanks for the help!
  11. novus22

    good Game Development resources

    Great! Thank you! I checked the reviews/reviewers and they correspond to my situation. I'll definitely check out the book. Thanks again! EDIT: I did a little more searching and found out that a big chunk of the code used in the book is deprecated. I also found his newer DX 12 book, but it's not released yet (March 31st, 2016).   Do you recommend any series that come to mind? I remember I checked out ChiliTomatoNoodle but that was before I even knew C++ so I gave up. I'm not sure if that's outdated or not. I'd also like a series that is either still going or finished (I have seen many that were left unfinished).
  12. Hello! I'm not sure if this is the correct place to ask this question, as I'm new to this community. I've been wanting to start game development for a long time now. I've been developing in Java and C++ for a bit more than a year, and I have the a clear knowledge of many of the concepts (Inheritance, Polymorphisim, OOP). With that being said, I'd like to delve into game programming. Question: I'd love it if you guys recommend good starting materials (preferably videos, but books are fine). Yes, i have been searching for resources, but maybe you guys can shorten the search. I'd like C++ resources, but if you do know good Java ones then please share them. I have tried Unity3D as well, but didn't quite like it. I want to learn how to create my own 3D engine. I know that's gonna be difficult, but I'm willing to invest a lot of time. An introductory level to 3D game development video series/book (if possible, that covers mostly everything) is what I'm asking for. Apologies if the question is too broad, but any help will be highly appreciated.
  • Advertisement

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!