Jump to content
  • Advertisement

yyam

Member
  • Content count

    12
  • Joined

  • Last visited

Community Reputation

0 Neutral

1 Follower

About yyam

  • Rank
    Member

Personal Information

  • Industry Role
    Programmer
  • Interests
    Business
    Design
    Production
    Programming

Social

  • Twitter
    yyamdev
  • Github
    yyamdev

Recent Profile Visitors

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

  1. Ah no wonder I wasn't getting any traffic from this page! I fixed the link.. Thank you! Yeah I really like how cute the hedgehog turned out
  2. Very late reply, but thank you! You were right about the reserved words!
  3. Hey there! I released my game, Hedgehogs Can Fly, on GameJolt today! It's a cute, 2D physics-platformer where you try to fling a hedgehog through tricky levels to get to the finish line. I wrote it from scratch in C++ with SFML. There are multiple types of terrain each with different properties and effects making for some interesting level design. The physics/level code also allows for free-form terrain that isn't constrained to a tile grid. The levels are loaded from color-coded image files, I have an entry in the devlog on the GameJolt page explaining how it all works! If these screenshots look cool, visit the GameJolt page here (With Trailer Video!) Screenshots incoming... Have a nice day
  4. I'm starting out learning graphics programming with DX11 and Win32 and so far I haven't found many quality resources. At the moment I'm trying to string together a few tutorrials (some based on DX10) to try and learn the basics. The tutorial I was reading used a D3DX function to compile shaders but as far as I understand, this library is deprecated? After some digging, I found the D3DCompileFromFile() function which I'm trying to use. Here is my c++ code: HINSTANCE d3d_compiler_lib = LoadLibrary("D3DCompiler_47.DLL"); assert(d3d_compiler_lib != NULL); typedef HRESULT (WINAPI *d3d_shader_compile_func)( LPCWSTR, const D3D_SHADER_MACRO *, ID3DInclude *, LPCSTR, LPCSTR, UINT, UINT, ID3DBlob **, ID3DBlob **); d3d_shader_compile_func D3DCompileFromFile = (d3d_shader_compile_func)GetProcAddress( d3d_compiler_lib, "D3DCompileFromFile"); assert(D3DCompileFromFile != NULL); ID3D10Blob *vs, *ps; hresult = D3DCompileFromFile( L"basic.shader", NULL, NULL, "VertexShader", "vs_4_0", 0, 0, &vs, NULL); assert(hresult == S_OK); // Fails here hresult = D3DCompileFromFile( L"basic.shader", NULL, NULL, "PixelShader", "ps_4_0", 0, 0, &ps, NULL); assert(hresult == S_OK); FreeLibrary(d3d_compiler_lib); In the failing assertion, hresult is 'E_FAIL', which according to MSDN, means: "Attempted to create a device with the debug layer enabled and the layer is not installed." I'm a bit lost at this point. I am also not 100% sure my D3DCompileFromFile signature is correct... It does match the version on MSDN though. Any ideas as to why this might be failing? I tried putting in the wrong file name and got (as expected) hresult == D3D11_ERROR_FILE_NOT_FOUND. So at least this is some indication that I haven't totally screwed up the function call. For reference, here is the shader file. I was able to compile it successfully using an online HLSL compiler. struct VOut { float4 position : SV_POSITION; float4 color : COLOR; }; VOut VertexShader(float4 position : POSITION, float4 color : COLOR) { VOut output; output.position = position; output.color = color; return output; } float4 PixelShader(float4 position : SV_POSITION, float4 color : COLOR) : SV_TARGET { return color; } Thanks for your time
  5. Thank you so much! Really great info, clears up a lot! Thanks everyone, you'll probably see me again when I screw something up
  6. Hello! I want to get into graphics programming so I've started learning DX11 but I'm not sure if it's the best choice to learn first. Obviously the end goal is to know as many as possible, but we all have to start somewhere. My first question is should I start by learning one of the newer, lower level, "bleeding edge" APIs like Vulkan/DX12, or should I start with DX11/OpenGL? I heard some people say that Vulkan/DX12 aren't really THAT much harder than the others but I've also heard the opposite. My thinking for choosing DX11 was that it was going to be easier and it would give me some good base knowledge to go and learn the more complicated APIs later. My second less important question is should I start with the DX or GL size? I've heard that DX is more programmer friendly and is easier to debug so will be better for beginners, is this true? A bit of background on my competency: I feel like I have a good knowledge of C and C++, I've completed a handful of games with SDL and SFML and I do embedded C programming as a job. My 3D math is lacking but I feel like it's something I can learn. Thanks for your help
  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!